<?php 

$db = require_once __DIR__."/lib/db.php";
require_once __DIR__ . "/class/user.php";
require_once __DIR__ . '/class/article.php';
require_once __DIR__ . '/class/rest.php';

$article = new Article($db);
$user = new User($db);

$rest = new Rest($user,$article);

$rest->run();
// var_dump($_SERVER);

// $article = new Article($db);
// // var_dump($article->edit(2,'hellow word','22电饭锅2',3));
// var_dump($article->delete(1,3));
 // var_dump($user->login('edmin','admin'));
